<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>猜数游戏</title>
    <script>
        var targetNumber =math.random(math.random()*100);
        function checkNumber(){
        var guessNumber=document.getElementById('guessNumber').value;
        console.log(geuessNumber);
        if(guessNumber<targetNumber){
            document.getElementById('notice').innerText="猜错了，数小了"

        }else if(geuessNumber>targetNumber){
            document.getElementById('notice').innerText="猜错了，数大了"

        }else{
            document.getElementById('notice').innerText="恭喜你，猜对了"
        }
    </script>
</head>
<body>
    <p>系统现在随机生成一个1—100数字， 请输入你觉得可能生成的数字</p>
    <input type="text" id="guessNumber" autocomplete="false" placeholder="请输入一个1-100的数">
    <input type="button" value="提交" onclick="checkNumber()">
    <p id="notice"></p>
</body>
</html>